# 客户端
import json

import DID_interface
other_did="did:p2p_did_chat:Yk6hiAdlTA"         # "did:p2p_did_chat:9pVhLAID5p"
port=8800
my_did="did:p2p_did_chat:Yk6hiAdlTA"
ip="10.70.88.94"
if DID_interface.DID_connect(other_did, port, my_did, ip):
    print("准备发送数据")
    data={"type": "text",
          "content": "你好，Bob！" ,
          "timestamp": "2025-07-10T10:30:00"}
    meg="hello"
    DID_interface.DID_send(meg)

    response = DID_interface.DID_recv()
    print("收到响应：", response)

DID_interface.DID_close()